import module.BigBrushPen;
import module.BrushPen;
import module.ImplementorColor;
import module.ImplementorGreenColor;
import module.ImplementorRedColor;
import module.ImplementorYellowColor;
import module.MiddleBrushPen;
import module.SmallBrushPen;

// 理论非常好： http://blog.csdn.net/hguisu/article/details/7529194
// http://www.cnblogs.com/dragonflyyi/p/5042917.html
//  解决多维度变化的  结构性问题。
public class ClientTest { 
	
	public static void main(String[] arg){
		//多维概念
        //形状维度
		BrushPen  smallBrushPen = new SmallBrushPen();
		BrushPen  middleBrushPen = new MiddleBrushPen();
		BrushPen  bigBrushPen    = new BigBrushPen();
		
		//颜色维度
		ImplementorColor    redColor = new ImplementorRedColor();
		ImplementorColor    yellowColor = new ImplementorYellowColor();
		ImplementorColor    greenColor = new ImplementorGreenColor();
		
		//现在可以自由组合了
		// 小红笔 =  小 + 红  
		smallBrushPen.setImplementorColor(redColor);
		smallBrushPen.drawOperation();
		
		//小绿笔 = 小 + 绿
		smallBrushPen.setImplementorColor(greenColor);
		smallBrushPen.drawOperation();
		
		//大黄笔 = 大 + 黄
		bigBrushPen.setImplementorColor(yellowColor);
		bigBrushPen.drawOperation();
		
		//中红笔 = 中 + 红
		middleBrushPen.setImplementorColor(redColor);
		middleBrushPen.drawOperation();
		
	}

}
